//Swiper
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:village_android/component/widget_banner.dart';
import 'package:village_android/config/contants.dart';

class SwiperWidget extends StatelessWidget {
  List items = [];
  SwiperWidget({this.items});



  @override
  Widget build(BuildContext context) {
//    print("设备像素高度:${ScreenUtil.screenHeight}");
//    print("设备像素宽度:${ScreenUtil.screenWidth}");
//    print("设备像素比例:${ScreenUtil.pixelRatio}");

  if(items == null){
    items = [];
//    items.add("http://s.mmbb123.com/party.jpg");
  }


    return Container(
        height: 170,
        width: ScreenUtil().setWidth(IPHONE6_HEIGHT),
        child: CustomBanner(items),
//        Swiper(
//          itemBuilder: (BuildContext context, int index) {
//            return Image.network(
//              "${items[index]["coverUrl"]}",
//              fit: BoxFit.fill,
//            );
//          },
//          itemCount: items.length,
//          pagination: SwiperPagination(),
//          autoplay: false,
//        )
    );
  }
}

